<%--
  Created by IntelliJ IDEA.
  icu.ikuns.User: Reimu
  Date: 2022/5/6
  Time: 23:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@page import="icu.ikuns.User" %>
<html>
<head>
    <title>注册处理</title>
</head>
<body>
    <%
        String userName = request.getParameter("userName");
        String passWord = request.getParameter("passWord");
        String userRealName = request.getParameter("userRealName");
        String sex = request.getParameter("sex");
        String pId = request.getParameter("pId");
        String[] interests = request.getParameterValues("interest");
        String interestStr = "";
        for (int i = 0; i < interests.length; i++) {
            interestStr += "," + interests[i];
        }
        if (interests.length > 0) {
            interestStr = interestStr.substring(1);
        }
        User u = new User(userName, passWord, userRealName, pId, sex, interestStr);
    %>
<%=u.toString()%>
</body>
</html>
